#include <stdio.h>

int main(void) {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  for(int i = 0; i < 2; i++) {
    if (a > b) {
      int tmp = b;
      b = a;
      a = tmp;
    }
    if (b > c) {
      int tmp = b;
      b = c;
      c = tmp;
    }
  }
  printf("%d %d", c, a);
  return 0;
}
